SELECT *
FROM BPS_Patients
WHERE StatusText = 'Active'
AND Internalid IN (
    SELECT INTERNALID
    FROM INVOICES i
    WHERE RECORDSTATUS = 1
    AND INVOICEID IN (
        SELECT INVOICEID
        FROM SERVICES s
        WHERE MBSITEM IN (965, 967, 92029, 92030, 392, 393, 92060, 92061)
        AND s.SERVICESTATUS in (0,2)
        AND s.RECORDSTATUS = 1
))
ORDER BY Surname,Firstname

-- Active Patients billed for GPCCM Plan and Review